// 地图公共存储

function EarthData () {
    this.modelList = []
    this.mvvmList = []
    this.earth = null
    this.canvas = null
    this.sourceUrl = 'http://47.95.193.52:9090'
}

EarthData.prototype.modelDestroy = function () {
    // 销毁全部绑定数据监听
    this.mvvmList.forEach(item => {
        item = item && item();
    })
    this.mvvmList = []

    // 销毁全部模型实例
    this.modelList.forEach(item => {
        item.destroy()
    })
    this.modelList = []
}

let earthData = new EarthData()

export default earthData